import {getIdentificationType,getTicketPackageLabel,getTicketPackageType,getSchool, getSchoolType,
  getSeatStatus,getTicketType,getStop,getShuttleDirection,getShuttle,getDistinctShuttleSeat,
  getOperationGroup,getShuttleStop,getShuttleSchool,getDepartment,getEmployeeInf,getRole,
  getCustomer, getAgreement,getUser,getCaretakerData,getDriverData,getRollCallAdminData,
  getRollCallBasicShuttleData,getLeaveSchoolType,getRollCallDailyShuttleData
} from '@/request/api/basicData'
//引用字段参数
export const refOpt = {
  //证件类型编号
  identification_type_id: {field_id: 'identification_type_id',label: '证件类型编号',type: 'text',col: 2 ,disabled: true },
  identification_type_name: {field_id: 'identification_type_name',label: '证件类型名称',type: 'reference',col: 2 ,refUrl: getIdentificationType,
  refCols:[
  {prop: 'identification_type_id', label: '证件类型编号',},
  {prop: 'identification_type_name', label: '证件类型名称',},
],entityKey: 'identification_type_name', valueKey: ['identification_type_id', 'identification_type_name'] },

  //套票标签
  packag_label_id: {label: '套票标签编号',field_id: 'packag_label_id',type: 'text',col: 2,disabled: true},
  packag_label_name: {label: '套票标签名称',field_id: 'packag_label_name',type: 'reference',col: 2,refUrl: getTicketPackageLabel,
  refCols: [
  {prop: 'packag_label_id', label: '套票标签编号',},
  {prop: 'packag_label_name', label: '套票标签名称',},
],entityKey: 'packag_label_name',valueKey: ['packag_label_id','packag_label_name'],
    searchField: ['name']},

  //套票类型
  packag_type_id: {field_id: 'packag_type_id',label: '套票类型编号',type: 'text',col: 3 ,disabled: true },
  packag_type_name: {field_id: 'packag_type_name',label: '套票类型名称',type: 'reference',col: 3 ,refUrl: getTicketPackageType,
  refCols:[
  {prop: 'packag_type_id', label: '套票类型编号',},
  {prop: 'packag_type_name', label: '套票类型名称',},
  {prop: 'custom_packag_type_name', label: '定制套票类型名称',},
  ],entityKey: 'packag_type_name', valueKey: ['packag_type_id','packag_type_name'],
    searchField: ['name']},

  //站点
  school_id: {label: '站点(讫地)编号',field_id: 'school_id',type: 'reference',col: 2,disabled: true},
  school_name: {label: '站点(讫地)名称',field_id: 'school_name',type: 'reference',col: 2,refUrl: getSchool,
  refCols: [
  {prop: 'school_id', label: '站点(讫地)编号',},
  {prop: 'school_name', label: '站点(讫地)名称',},
],entityKey: 'school_name',valueKey: ['school_id','school_name'],
    searchField: ['name']},

  //站点类型
  school_type_id: {label: '站点(讫地)类型编号',field_id: 'school_type_id',type: 'reference',col: 2,disabled: true},
  school_type_name: {label: '站点(讫地)类型名称',field_id: 'school_type_name',type: 'reference',col: 2,refUrl: getSchoolType,
  refCols: [
  {prop: 'school_type_id', label: '站点(讫地)类型编号',},
  {prop: 'school_type_name', label: '站点(讫地)类型名称',},
],entityKey: 'school_type_name',valueKey: ['school_type_id','school_type_name'],
    searchField: ['name']},

  //座位状态
  seat_status_id: {field_id: 'seat_status_id',label: '座位状态编号',type: 'text',col: 2 ,disabled: true },
  seat_status_name: {field_id: 'seat_status_name',label: '座位状态名称',type: 'reference',col: 2 ,refUrl: getSeatStatus,
  refCols: [
  {label: '座位状态编号',prop: 'seat_status_id'},
  {label: '座位状态名称',prop: 'seat_status_name'},],entityKey: 'seat_status_name', valueKey: ['seat_status_id','seat_status_name'] ,
    searchField: ['name']},

  //车票类型
  ticket_typall_id: {field_id: 'ticket_typall_id',label: '车票类型编号',type: 'text',col: 2 ,disabled: true },
  ticket_typall_name: {field_id: 'ticket_typall_name',label: '车票类型名称',type: 'reference',col: 2 ,refUrl: getTicketType,
  refCols:[
  {prop: 'ticket_typall_id', label: '车票类型编号',},
  {prop: 'ticket_typall_name', label: '车票类型名称',},
],entityKey: 'ticket_typall_name', valueKey: ['ticket_typall_id','ticket_typall_name'] ,
    searchField: ['name']},

  //站点
  stop_id: {field_id: 'stop_id',label: '站点编号',type: 'text',col:2,disabled: true },
  stop_name:{field_id: 'stop_name',label: '站点名称',type: 'reference',col:2 ,refUrl: getStop,
  refCols: [
  {prop: 'stop_id', label: '站点编号',},
  {prop: 'stop_name', label: '站点名称',},
],entityKey: 'stop_name',valueKey: ['stop_id','stop_name'],
    searchField: ['name']},

  //班车方向
  shuttle_direction_id: {field_id: 'shuttle_direction_id',label: '方向编号',type: 'text',col:2 ,disabled: true },
  shuttle_direction_name: {field_id: 'shuttle_direction_name',label: '方向',type: 'reference',col:2, refUrl: getShuttleDirection,
  refCols: [
  {prop: 'shuttle_direction_id', label: '方向编号',},
  {prop: 'shuttle_direction_name', label: '方向',},
  {prop: 'custom_shuttle_direction_name', label: '定制班车方向',},
],entityKey: 'shuttle_direction_name',valueKey: ['shuttle_direction_id','shuttle_direction_name'],
    searchField: ['name']},

  //班车
  shuttle_id: {field_id: 'shuttle_id',label: '班车编号',type: 'text',col: 3 ,disabled: true },
  shuttle_name: {field_id: 'shuttle_name',label: '班车名称',type: 'reference',col: 3 ,refUrl: getShuttle,
  refCols: [
  {prop: 'shuttle_id',label: '班车编号' },
  {prop: 'shuttle_name',label: '班车名称' },],entityKey: 'shuttle_name', valueKey: ['shuttle_id','shuttle_name'] ,
    searchField: ['name']},

  //班车座位
  shuttle_seat_id: {field_id: 'shuttle_seat_id',label: '班车座位编号',type: 'text',col: 3 ,disabled: true },
  shuttle_seat_name: {field_id: 'shuttle_seat_name',label: '班车座位名称',type: 'reference',col: 3 ,refUrl: getDistinctShuttleSeat,
  refCols: [
  {prop: 'shuttle_seat_id',label: '班车座位编号' },
  {prop: 'shuttle_seat_name',label: '班车座位名称' },],entityKey: 'shuttle_seat_name', valueKey: ['shuttle_seat_id','shuttle_seat_name'],
  searchField: ['shuttle_seat_name']},

  //班车站点
  shuttle_stop_id: {field_id: 'stop_id',label: '班车站点编号',type: 'text',col: 3 ,disabled: true },
  shuttle_stop_name: {field_id: 'stop_name',label: '班车站点名称',type: 'reference',col: 3 ,refUrl: getShuttleStop,
  refCols: [
  {prop: 'stop_id',label: '班车站点编号' },
  {prop: 'stop_name',label: '班车站点名称' },],entityKey: 'stop_name', valueKey: ['stop_id','stop_name'],
  searchField: ['stop_name']},

  //班车站点
  shuttle_school_id: {field_id: 'school_id',label: '班车站点(讫地)编号',type: 'text',col: 3 ,disabled: true },
  shuttle_school_name: {field_id: 'school_name',label: '班车站点(讫地)名称',type: 'reference',col: 3 ,refUrl: getShuttleSchool,
  refCols: [
  {prop: 'school_id',label: '班车站点(讫地)编号' },
  {prop: 'school_name',label: '班车站点(讫地)名称' },],entityKey: 'school_name', valueKey: ['school_id','school_name'],
    searchField: ['school_name'] },

  //营运组
  operation_group_id: {field_id: 'operation_group_id',label: '营运组编号',type: 'text',col: 3 ,disabled: true },
  operation_group_name: {field_id: 'operation_group_name',label: '营运组名称',type: 'reference',col: 3,refUrl: getOperationGroup,
  refCols: [
  {prop: 'operation_group_id',label: '营运组编号' },
  {prop: 'operation_group_name',label: '营运组名称' },],entityKey: 'operation_group_name', valueKey: ['operation_group_id','operation_group_name'] ,
    searchField: ['operation_group_name']},

  //部门
  department_id: {field_id: 'department_id',label: '部门编号',type: 'text',col: 3 ,disabled: true },
  department_name: {field_id: 'department_name',label: '部门名称',type: 'reference',col: 3,refUrl: getDepartment,
  refCols: [
  {prop: 'department_id',label: '部门编号' },
  {prop: 'department_name',label: '部门名称' },],entityKey: 'department_name', valueKey: ['department_id','department_name'] ,
    searchField: ['department_name']},

  //员工
  job_no: {field_id: 'job_no',label: '员工编号',type: 'text',col: 3 ,disabled: true },
  job_name: {field_id: 'job_name',label: '员工名称',type: 'reference',col: 3,refUrl: getEmployeeInf,
  refCols: [
  {prop: 'job_no',label: '员工编号' },
  {prop: 'job_name',label: '员工名称' },],entityKey: 'job_name', valueKey: ['job_no','job_name'] ,
    searchField: ['job_name']},

  //角色
  role_id: {field_id: 'role_id',label: '角色编号',type: 'text',col: 3 ,disabled: true },
  role_name: {field_id: 'role_name',label: '角色名称',type: 'reference',col: 3,refUrl: getRole,
  refCols: [
  {prop: 'role_id',label: '角色编号' },
  {prop: 'role_name',label: '角色名称' },],entityKey: 'role_name', valueKey: ['role_id','role_name'] ,
    searchField: ['role_name']},

  //客户
  customer_id: {field_id: 'customer_id',label: '客户编号',type: 'text',col: 3 ,disabled: true },
  customer_name: {field_id: 'customer_name',label: '客户名称',type: 'reference',col: 3,refUrl: getCustomer,
  refCols: [
  {prop: 'customer_id',label: '客户编号' },
  {prop: 'customer_name',label: '客户名称' },],entityKey: 'customer_name', valueKey: ['customer_id','customer_name'] ,
    searchField: ['customer_name']},

  //协议
  agreement_id: {field_id: 'agreement_id',label: '协议编号',type: 'text',col: 3 ,disabled: true },
  agreement_name: {field_id: 'agreement_name',label: '协议名称',type: 'reference',col: 3,refUrl: getAgreement,
  refCols: [
  {prop: 'agreement_id',label: '客户编号' },
  {prop: 'agreement_name',label: '客户名称' },],entityKey: 'agreement_name', valueKey: ['agreement_id','agreement_name'] ,
    searchField: ['agreement_name']},

  // 用户
  user_id: {field_id: 'user_id', label: '用户编号',type: 'text', col: 3,disabled: true},
  user_name: {field_id: 'user_name',label: '用户名称',type: 'reference',col: 3,refUrl: getUser,
    refCols: [{prop: 'user_id',label: '用户编号' },
      {prop: 'user_name',label: '用户名称' },],
    entityKey: 'user_name', valueKey: ['user_id','user_name'] ,
    searchField: ['user_name']
  },

  // 照管员
  caretaker_no: {field_id: 'caretaker_no', label: '照管员号',type: 'text', col: 3,disabled: true},
  caretaker_name: {field_id: 'caretaker_name',label: '照管员名',type: 'reference',col: 3,refUrl: getCaretakerData,
    refCols: [{prop: 'caretaker_no',label: '照管员号' },
      {prop: 'caretaker_name',label: '照管员名' },],
    entityKey: 'caretaker_name', valueKey: ['caretaker_no','caretaker_name'] ,
    searchField: ['caretaker_name']
  },

  // 司机
  driver_no: {field_id: 'driver_no', label: '司机工号',type: 'text', col: 3,disabled: true},
  driver_name: {field_id: 'driver_name',label: '司机姓名',type: 'reference',col: 3,refUrl: getDriverData,
    refCols: [{prop: 'driver_no',label: '司机工号' },
      {prop: 'driver_name',label: '司机姓名' },],
    entityKey: 'driver_name', valueKey: ['driver_no','driver_name'] ,
    searchField: ['driver_name']
  },

  // 点名管理人
  rollcall_admin_no: {field_id: 'rollcall_admin_no', label: '点名管理人号',type: 'text', col: 3,disabled: true},
  rollcall_admin_name: {field_id: 'rollcall_admin_name',label: '点名管理人名',type: 'reference',col: 3,refUrl: getRollCallAdminData,
    refCols: [{prop: 'rollcall_admin_no',label: '点名管理人号' },
      {prop: 'rollcall_admin_name',label: '点名管理人名' },],
    entityKey: 'rollcall_admin_name', valueKey: ['rollcall_admin_no','rollcall_admin_name'] ,
    searchField: ['rollcall_admin_name']
  },


  //基础点名班车
  rollcall_shuttle_id: {field_id: 'shuttle_no',label: '点名班车号',type: 'text',col: 3 ,disabled: true },
  rollcall_shuttle_name: {field_id: 'shuttle_name',label: '点名班车名',type: 'reference',col: 3 ,refUrl: getRollCallBasicShuttleData,
    refCols: [
      {prop: 'shuttle_no',label: '点名班车号' },
      {prop: 'shuttle_name',label: '点名班车名' },],entityKey: 'shuttle_name', valueKey: ['shuttle_no','shuttle_name'] ,
    searchField: ['shuttle_name']},
  //每日点名班车
  rollcall_daily_shuttle_id: {field_id: 'shuttle_no',label: '点名班车号',type: 'text',col: 3 ,disabled: true },
  rollcall_daily_shuttle_name: {field_id: 'shuttle_name',label: '点名班车名',type: 'reference',col: 3 ,refUrl: getRollCallDailyShuttleData,
    refCols: [
      {prop: 'shuttle_no',label: '点名班车号' },
      {prop: 'shuttle_name',label: '点名班车名' },],entityKey: 'shuttle_name', valueKey: ['shuttle_id','shuttle_name'] ,
    searchField: ['shuttle_name']},


  leave_school_id:{field_id: 'leave_school_id',label: '下车接送方式编号',type: 'text',col: 3 ,disabled: true },
  leave_school_name: {field_id: 'leave_school_name',label: '下车接送方式名称',type: 'reference',col: 3 ,refUrl: getLeaveSchoolType,
    refCols: [
      {prop: 'leave_school_id',label: '下车接送方式编号' },
      {prop: 'leave_school_name',label: '下车接送方式名称' },],entityKey: 'leave_school_name', valueKey: ['leave_school_id','leave_school_name'] ,
    searchField: ['leave_school_name']},
}
